﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using KP_CommonLibrary.KP_Interface;

namespace KP_CommonLibrary.KP_CommonControls
{
    public partial class KP_UserControl : UserControl, IKPDataForm
    {
        public KP_UserControl()
        {
            InitializeComponent();            
        }
        public virtual void Close()
        {
        }
        protected new bool DesignMode
        {
            get
            {
                if (base.DesignMode)
                    return true;
                return LicenseManager.UsageMode == LicenseUsageMode.Designtime;
            }
        }

        #region IKPDataForm Members

        public virtual void LoadData()
        {

        }

        public virtual void LoadLayout()
        {

        }

        #endregion

        public virtual bool DispatchCmdKey(ref Message msg, Keys keyData)
        {
            return false;
        }
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            if (!DispatchCmdKey(ref msg, keyData))
                return base.ProcessCmdKey(ref msg, keyData);
            return true;
        }

        private void KP_UserControl_Load(object sender, EventArgs e)
        {

        }
    }
}
